/*     */ package com.yss.sofa.cml.print;
/*     */ 
/*     */ import com.yss.sofa.cml.SerializableObject;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ 
/*     */ public class PrintPage
/*     */   implements SerializableObject
/*     */ {
/*     */   private static final long serialVersionUID = 1L;
/*     */   private List<PrintElement> elements;
/*     */   private int pageIndex;
/*     */   private int pageWidth;
/*     */   private int pageHeight;
/*     */   private PrintLayer backgroundLayer;
/*     */   private PrintLayer headerFooterLayer;
/*     */   private PrintLayer contentLayer;
/*     */   private PrintLayer stampsLayer;
/*     */   private PrintLayer imagesLayer;
/*     */   private List<PrintElement> background;
/*     */   private List<PrintElement> pageHeader;
/*     */   private List<PrintElement> pageFooter;
/*     */   private List<PrintElement> title;
/*     */   private List<PrintElement> columnHeader;
/*     */   private List<PrintElement> columnFooter;
/*     */   private List<PrintElement> detail;
/*     */   private List<PrintElement> summary;
/*     */   private List<PrintElement> stamps;
/*     */   private List<PrintElement> images;
/*     */   private List<PrintLayer> layers;
/*     */ 
/*     */   public PrintPage()
/*     */   {
/*  26 */     int zIndex = 1;
/*  27 */     this.backgroundLayer = new PrintLayer(zIndex++);
/*  28 */     this.stampsLayer = new PrintLayer(zIndex++);
/*  29 */     this.headerFooterLayer = new PrintLayer(zIndex++);
/*  30 */     this.contentLayer = new PrintLayer(zIndex++);
/*  31 */     this.imagesLayer = new PrintLayer(zIndex++);
/*     */ 
/*  33 */     this.layers = new ArrayList();
/*  34 */     this.layers.add(this.backgroundLayer);
/*  35 */     this.layers.add(this.stampsLayer);
/*  36 */     this.layers.add(this.headerFooterLayer);
/*  37 */     this.layers.add(this.contentLayer);
/*  38 */     this.layers.add(this.imagesLayer);
/*     */ 
/*  40 */     this.elements = new ArrayList();
/*     */   }
/*     */ 
/*     */   public PrintPage(int pageIndex) {
/*  44 */     this.pageIndex = pageIndex;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getElements() {
/*  48 */     return this.elements;
/*     */   }
/*     */ 
/*     */   public int getPageIndex() {
/*  52 */     return this.pageIndex;
/*     */   }
/*     */ 
/*     */   public int getPageWidth() {
/*  56 */     return this.pageWidth;
/*     */   }
/*     */ 
/*     */   public int getPageHeight() {
/*  60 */     return this.pageHeight;
/*     */   }
/*     */ 
/*     */   public void setPageIndex(int pageIndex) {
/*  64 */     this.pageIndex = pageIndex;
/*     */   }
/*     */ 
/*     */   public void setPageWidth(int pageWidth) {
/*  68 */     this.pageWidth = pageWidth;
/*     */   }
/*     */ 
/*     */   public void setPageHeight(int pageHeight) {
/*  72 */     this.pageHeight = pageHeight;
/*     */   }
/*     */ 
/*     */   public PrintLayer getBackgroundLayer() {
/*  76 */     return this.backgroundLayer;
/*     */   }
/*     */ 
/*     */   public PrintLayer getHeaderFooterLayer() {
/*  80 */     return this.headerFooterLayer;
/*     */   }
/*     */ 
/*     */   public PrintLayer getContentLayer() {
/*  84 */     return this.contentLayer;
/*     */   }
/*     */ 
/*     */   public PrintLayer getStampsLayer() {
/*  88 */     return this.stampsLayer;
/*     */   }
/*     */ 
/*     */   public PrintLayer getImagesLayer() {
/*  92 */     return this.imagesLayer;
/*     */   }
/*     */ 
/*     */   public void setBackground(List<PrintElement> elements) {
/*  96 */     this.background = elements;
/*  97 */     this.backgroundLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setPageHeader(List<PrintElement> elements) {
/* 101 */     this.pageHeader = elements;
/* 102 */     this.headerFooterLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setPageFooter(List<PrintElement> elements) {
/* 106 */     this.pageFooter = elements;
/* 107 */     this.headerFooterLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setColumnHeader(List<PrintElement> elements) {
/* 111 */     this.columnHeader = elements;
/* 112 */     this.contentLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setColumnFooter(List<PrintElement> elements) {
/* 116 */     this.columnFooter = elements;
/* 117 */     this.contentLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setTitle(List<PrintElement> elements) {
/* 121 */     this.title = elements;
/* 122 */     this.contentLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setSummary(List<PrintElement> elements) {
/* 126 */     this.summary = elements;
/* 127 */     this.contentLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setDetail(List<PrintElement> elements) {
/* 131 */     this.detail = elements;
/* 132 */     this.contentLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setStamps(List<PrintElement> elements) {
/* 136 */     this.stamps = elements;
/* 137 */     this.stampsLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public void setImages(List<PrintElement> elements) {
/* 141 */     this.images = elements;
/* 142 */     this.imagesLayer.addElements(elements);
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getBackground() {
/* 146 */     return this.background;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getPageHeader() {
/* 150 */     return this.pageHeader;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getPageFooter() {
/* 154 */     return this.pageFooter;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getTitle() {
/* 158 */     return this.title;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getColumnHeader() {
/* 162 */     return this.columnHeader;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getColumnFooter() {
/* 166 */     return this.columnFooter;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getDetail() {
/* 170 */     return this.detail;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getSummary() {
/* 174 */     return this.summary;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getStamps() {
/* 178 */     return this.stamps;
/*     */   }
/*     */ 
/*     */   public List<PrintElement> getImages() {
/* 182 */     return this.images;
/*     */   }
/*     */ 
/*     */   public void packAll() {
/* 186 */     for (PrintLayer layer : this.layers)
/* 187 */       if (layer.getElements() != null)
/* 188 */         getElements().addAll(layer.getElements());
/*     */   }
/*     */ 
/*     */   public String toString()
/*     */   {
/* 194 */     return "PrintPage[Index=" + this.pageIndex + ",Width=" + this.pageWidth + ",Height=" + this.pageHeight + "]";
/*     */   }
/*     */ }

/* Location:           X:\repository\com\yss\sofa\cml\cml-api\1.1.0\cml-api-1.1.0.jar
 * Qualified Name:     com.yss.sofa.cml.print.PrintPage
 * JD-Core Version:    0.6.0
 */